import Vue from "vue";
import Router from "vue-router";
import Show from "@/components/Show";
import Episode from "@/components/Episode";
import Album from "@/components/Album";
import Cate from "@/components/Cate";
import Movie from "@/components/Movie";

import ga from 'vue-ga'




Vue.use(Router)




const router = new Router({
    routes: [
        // {
        //     path: '/',
        //     name: 'Hello',
        //     component: Hello
        // },
        // {
        //     path: '/',
        //     name: 'Home',
        //     component: Cate,
        // },
        {
            path: '/',
            redirect: {name: 'Cate', params: {id: '人气'}}
        },
        {
            path: '/show/:showId',
            name: 'Show',
            component: Show,
            children: [
                {
                    path: 'episode/:episodeId',
                    name: "ShowEpisode",
                    component: Episode,
                },
            ]
        },
        {
            path: '/episode/:id',
            name: 'Episode',
            component: Episode
        },
        {
            path: '/album/:id',
            name: 'Album',
            component: Album
        },
        {
            path: '/cate/:id',
            name: 'Cate',
            component: Cate,

        },

        {
            path: '/search/:keyword',
            name: 'Search',
            component: Cate
        },
        {
            path: '/movie',
            name: 'movie',
            component: Movie
        },

    ],
    linkActiveClass: 'is-warning',
    mode:'history',
})
ga(router, 'UA-77530922-3')

export default router



